package com;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.Environment;

/**
 * xxl定时任务服务
 */
@SpringBootApplication
@Slf4j
public class TestXxlJobApp {

    public static void main(String[] args) {
        ConfigurableApplicationContext application = SpringApplication.run(TestXxlJobApp.class, args);
        Environment env = application.getEnvironment();
        String port = env.getProperty("server.port");
        String path = env.getProperty("server.servlet.context-path");
        log.info("\n----------------------------------------------------------\n\t" +
                "Application XxlJobAdmin is running! Access URLs:\n\t" +
                "Local: \t\thttp://localhost:" + port + path + "/\n\t" +
                "----------------------------------------------------------");
    }
}